package com.liusaidh.service.impl;

import com.liusaidh.domain.User;
import com.liusaidh.mapper.FansMapper;
import com.liusaidh.mapper.UserMapper;
import com.liusaidh.service.FansService;
import com.liusaidh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liusaidh
 * @date 2024/4/10 10:20
 * @description 我的粉丝和我的关注的业务
 */
@Service
public class FansServiceImpl implements FansService {

    @Autowired
    private FansMapper fansMapper;



    @Override
    public List<User> getMyFansList(Integer id,Integer pageNo,Integer pageSize) {
        return fansMapper.getMyFansList(id,(pageNo - 1)*pageSize,pageSize);
    }

    @Override
    public List<User> getMyIdolsList(Integer id,Integer pageNo,Integer pageSize) {
      return fansMapper.getMyIdolsList(id,(pageNo - 1)*pageSize,pageSize);
    }

    @Override
    public Integer getMyFansListSize(Integer id) {
        return fansMapper.getMyFansListSize(id);
    }

    @Override
    public Integer getMyIdolsListSize(Integer id) {
        return fansMapper.getMyIdolsListSize(id);
    }
}
